
//引入createStore并且创建store对象
// applyMiddleware引入中间件
import {createStore,compose,applyMiddleware} from 'redux'
//引入thunk 用来处理异步请求的
import thunk from 'redux-thunk'
// createStore传入的参数一为reducer 作用是将state与action连接起来
import cReducer from './reducer'
//参数二为加强 (放中间件之类的)
//我们想用的redux调试工具也在此配置 用它再包裹中间件即可
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store =createStore(cReducer,composeEnhancers(applyMiddleware(thunk))) 
export default store
//配置好store文件我们去app中将store共享出去 好让组件拿到store
